package com.central.apps.handler.timeTask;

import com.central.app.common.quartz.QuartzJob;
import com.central.bizcommon.model.schedule.JobParams;
import com.central.common.exception.service.ServiceException;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
@Component
@DisallowConcurrentExecution
public class JobTest extends QuartzJob {


    @Override
    protected void executeJob(JobExecutionContext context, String jobnum, String jobname, List<JobParams> jobparams) throws JobExecutionException {
        try {
            throw new ServiceException("+++++++++1");
        }catch (Exception e){
            e.printStackTrace();
            log.warn(e.getMessage());
        }
    }
}
